package com.edu.javaweb.service.impl;

import com.edu.javaweb.mapper.StudentMapper;
import com.edu.javaweb.pojo.StuClass;
import com.edu.javaweb.pojo.Student;
import com.edu.javaweb.service.StudentService;
import com.edu.javaweb.vo.Rule;
import com.edu.javaweb.vo.StudentRecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> findAll() {
        return studentMapper.findAll();
    }

    @Override
    public void insStudent(Student student) {
        studentMapper.insStudent(student);
    }

    @Override
    public void upStudent(Student student) {
        studentMapper.upById(student);
    }

    @Override
    public void delById(Integer id) {
        studentMapper.delById(id);
    }

    @Override
    public Student findByName(String account) {
        return studentMapper.findByName(account);
    }

    @Override
    public void cgStudentPassword(Student student) {
        studentMapper.upById(student);
    }

    @Override
    public Student getStudent(String account) {
        return studentMapper.getStudent(account);
    }

}
